<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.ISystem"%>
<%@ page import="jt.classic.system.utils.SystemTool"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.basework.console.XSystemConfig"%>
<%
  response.setHeader("Pragma","No-cache");//HTTP 1.1 
  response.setHeader("Cache-Control","no-cache");//HTTP 1.0 
  response.setHeader("Expires","0");//防止被proxy 
  

  String context = jt.classic.system.ISystem.getContextPath();
  
  String serverPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
  
  if (ISystem.invalidSesstion(request)) {
	  out.println("<script language='javascript'>");
	  out.println("alert(\"当前会话无效,请重新登录\");");
	  out.println("top.location.href = '"+context+"';");
	  out.println("</script>");
  }else{
  IUser user = ISystem.getSessionUser(request);
  String ssosessionkey = ISystem.getSSOSessionKey(user);
  
%>
<script>
	var context = "<%=context%>";
	var serverPath = "<%=serverPath%>";
	var SSOSESSIONKEY = "<%=ssosessionkey%>";
	var userName = "<%=user.iname()%>";
	var IP = "<%=request.getRemoteAddr()%>";
	 if(document.all){
	     setTimeout("CollectGarbage()",1000);
	 }
  
  	var XSYSTEM_DBSQLKINTTER = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_DBSQLKINTTER)%>";
	var XSYSTEM_ANNEX_TRANSACTOR = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_ANNEX_TRANSACTOR)%>";
	var XSYSTEM_LOB_HANDLER = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_LOB_HANDLER)%>";
	var XSYSTEM_DATASOURCE = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_DATASOURCE)%>";
	var XSYSTEM_CHARSETNAME = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_CHARSETNAME)%>";
	var XSYSTEM_SESSIONFILTER = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_SESSIONFILTER)%>";
	var XSYSTEM_CHECKBROWSER = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_CHECKBROWSER)%>";
	var XSYSTEM_HOMEPAGE = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_HOMEPAGE)%>";
	var XSYSTEM_LOGINPAGE = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_LOGINPAGE)%>";
	var XSYSTEM_CONSOLE_IP = "<%=XSystemConfig.config().getProperty(XSystemConfig.XSYSTEM_CONSOLE_IP)%>";
	var GROOVE_VERSION = "<%=XSystemConfig.config().getProperty("GROOVE_VERSION")%>";
	//*************判断当前用户是否属于某具体的角色************************
	var judge_role = false;
	<%if(ISystem.matchrole(user, "jxxfbbgsuser")){%>
		  judge_role = true;
	<%}%>
</script>
<script language="javascript"
	src="<%=context%>/resources/common/js/common.js"></script>
<script language="javascript"
	src="<%=context%>/resources/common/js/hashmap.js"></script>
<!-- ** CSS ** -->
<!-- base library -->
<link rel="stylesheet" type="text/css" href="<%=context%>/resources/ext3/resources/css/ext-all.css" />
<!-- ExtJS library: base/adapter -->
<script type="text/javascript" src="<%=context%>/resources/ext3/adapter/ext/ext-base.js"></script>
<!-- ExtJS library: all widgets -->
<script type="text/javascript" src="<%=context%>/resources/ext3/ext-all.js"></script>
<!-- ExtJS language -->
<script type="text/javascript" src="<%=context%>/resources/ext3/locale/ext-lang-zh_CN.js"></script>
<script>
var EXT_THEME = "<%=StringTool.checkString(XSystemConfig.config().getProperty("EXT_THEME"))%>";
if(EXT_THEME != ""){
Ext.util.CSS.swapStyleSheet('theme', context + '/resources/ext3/resources/css/' + EXT_THEME);
}
Ext.BLANK_IMAGE_URL = "<%=context%>/resources/ext3/resources/images/default/s.gif"; 
</script>
<%}%>